From: Giovanni Campagna Date: Tue, 21 Dec 2010 14:53:28 +0000 (+0100) Subject: BluetoothStatus: hide the device separator if no devices are shown X-Git-Tag: archive/raspbian/50.5-1+rpi1~1^2~1013^2^2~9322 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/%22/%22http:/www.example.com/cgi/%22?a=commitdiff_plain;h=cedcbc5fcf33c5033ea35030d491858a963fa317;p=gnome-shell.git BluetoothStatus: hide the device separator if no devices are shown When BluetoothApplet::show-full-menu property is notified (when you switch from a disabled adapter / no adapter to an active one), we would show all the menu, including the device separator, without checking if any devices actually existed. https://bugzilla.gnome.org/show_bug.cgi?id=637690 --- diff --git a/js/ui/status/bluetooth.js b/js/ui/status/bluetooth.js index 47a7ed288..7a6206d11 100644 --- a/js/ui/status/bluetooth.js +++ b/js/ui/status/bluetooth.js @@ -267,7 +267,10 @@ Indicator.prototype = { _updateFullMenu: function() { if (this._applet.show_full_menu) { this._showAll(this._fullMenuItems); - this._showAll(this._deviceItems); + if (this._hasDevices) + this._showAll(this._deviceItems); + else + this._deviceSep.hide(); } else { this._hideAll(this._fullMenuItems); this._hideAll(this._deviceItems);